<?php

namespace app\api\validation;

class Exchange extends \think\Validate
{
    protected $rule = [
        'name' => 'require',
        'desc' => 'require',
        'category_id' => 'require',
        'quality' => 'require',
        'longitude' => 'require',
        'latitude' => 'require',
        'exchange_name' => 'require',
        'exchange_quality' => 'require',
        'thumbs' => 'require'
    ];

    protected $message = [
        'name.require' => '商品名称不能为空',
        'category_id.require' => '分类不能为空',
        'desc.require' => '商品描述不能为空',
        'quality.require' => '成色不能为空',
        'longitude.require' => '经纬度不能为空',
        'latitude.require' => '经纬度不能为空',
        'exchange_name.require' => '期望交换商品名称不能为空',
        'exchange_quality.require' => '期望交换商品成色不能为空',
        'thumbs.require' => '商品图片不能为空'
    ];
}